package com.kfm.pm.exec;

import java.util.Comparator;
import java.util.TreeSet;

public class Exec01 {

    public static void main(String[] args) {
        TreeSet<Student> treeSet = new TreeSet<>(new Comparator<Student>() {
            @Override
            public int compare(Student o1, Student o2) {
                return Double.compare(o1.getScore(), o2.getScore());
            }
        });
        for (int i = 0; i < 20; i ++) {
            treeSet.add(new Student());
        }
        System.out.println(treeSet);
    }
}
